﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Meditek.UI.Controls
{
    public partial class MessageLabel : System.Web.UI.UserControl
    {
        public void ShowInfo(string Message, bool IsError)
        {

            if (string.IsNullOrEmpty(Message))
            {
                lblError.Visible = false;
                return;
            }

            lblError.Visible = true;
            lblError.Text = Message;
            if (IsError)
            {
                lblError.ForeColor = System.Drawing.Color.FromArgb(133, 4, 6);
                lblError.BackColor = System.Drawing.Color.FromArgb(254, 225, 225);
                lblError.BorderColor = System.Drawing.Color.FromArgb(133, 4, 6);
            }
            else
            {
                lblError.ForeColor = System.Drawing.Color.FromArgb(153, 153, 153);
                lblError.BackColor = System.Drawing.Color.FromArgb(179, 255, 179);
                lblError.BorderColor = System.Drawing.Color.FromArgb(0, 198, 0);
            }
        }
    }
}